package com.medicalfee.util;

public class BaseAmountCount {
	// 职工基本额度
	public static double baseAmountOfStuff(int yearAttendWork, int currentYear) {
		int workYear = currentYear - yearAttendWork;
		double amount = 0;
		if (workYear <= 10) {
			amount = (150 + workYear * 3) * 12;
		} else if (workYear <= 20) {
			amount = (180 + (workYear - 10) * 4) * 12;
		} else {
			amount = (220 + (workYear - 20) * 5.5) * 12;
			amount = DoubleCalculateUtil.mul(
					DoubleCalculateUtil.add(220,
							DoubleCalculateUtil.mul((workYear - 20), 5.5)), 12);
		}
		return amount;
	}

	// 独生子女基本额度
	public static double baseAmountOfChild(int birthYear, int currentYear) {
		int age = currentYear - birthYear;
		double amount = 0;
		if (age <= 10) {
			amount = (110 + age * 3) * 6;
		} else if (age <= 18) {
			amount = (140 + (age - 10) * 4) * 6;
		}
		return amount;
	}
}
